package com.jxwifi.cloud.quickclean.adapter;

import android.graphics.Color;
import android.support.annotation.LayoutRes;
import android.support.v4.content.ContextCompat;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jxwifi.cloud.quickclean.R;
import com.jxwifi.cloud.quickclean.bean.RewardBean;

public class PopRewardAdapter extends BaseQuickAdapter<RewardBean, BaseViewHolder> {

    private int mAreaindex;

    public PopRewardAdapter(@LayoutRes int layoutResId){
        super(layoutResId,null);
       // mAreaindex=index;
    }

    @Override
    protected void convert(BaseViewHolder helper, RewardBean item) {

        //shap_with_bg
        if (item.isChechCK()){
            helper.setBackgroundRes(R.id.tv_pop_reward_money, R.drawable.shap_set_reward);
            helper.setTextColor(R.id.tv_pop_reward_money, ContextCompat.getColor(mContext, R.color.color_text5));
        }else{
            helper.setBackgroundRes(R.id.tv_pop_reward_money,R.drawable.shap_set_meal_nu);
            helper.setTextColor(R.id.tv_pop_reward_money, ContextCompat.getColor(mContext, R.color.color_text4));
        }
        helper.setText(R.id.tv_pop_reward_money,item.getAmount());
        //helper.setText(R.id.tv_pop_list_area,item.getArea());
        //helper.setText(R.id.tv_pop_list_area_center,item.getDescription());

    }
}
